<template>
	<el-row>
		<el-col :span="24" :offset="1">
			
			<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
				<el-tab-pane label="全部订单" name="first">
				</el-tab-pane>
				<el-tab-pane label="未支付订单" name="second">
				</el-tab-pane>
				<el-tab-pane label="已支付订单" name="third">
				</el-tab-pane>
				<el-tab-pane label="支付失败订单" name="fourth">
				</el-tab-pane>
			</el-tabs>
			<router-view></router-view>
		</el-col>
	</el-row>
</template>
<script>
	export default {
		data() {
			return {
				activeName: 'first'
			};
		},
		methods: {
			handleClick(tab, event) {
				if (tab.name == 'first') {
					this.$router.push({
						path:'/order/allOrder'
					})
					
				}else if(tab.name == 'second'){
					this.$router.push({
						path:'/order/unpaidOrder'
					})
					
				}else if(tab.name == 'third'){
					this.$router.push({
						path:'/order/successFulOrder'
					})
					
				}else if(tab.name == 'index'){
					this.$router.push({
						path:'/'
					})
					
				}else{
					this.$router.push({
						path:'/order/failedOrder'
					})
				}

			}
		},

	};
</script>
<style>
</style>
